#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 5.3.22 9:02 AM
# @File    : conftest.py
import pytest
from selenium import webdriver
from src.common.browser_manager import Browser


@pytest.fixture()
def ta_listener():
    print('--------------TestCase begin-----------------')
    chrome_options = webdriver.ChromeOptions()
    # options.add_argument("--headless")
    chrome_options.add_argument('--no-sandbox')
    chrome_options.add_argument('--disable-gpu')
    chrome_options.add_argument('--disable-dev-shm-usage')
    driver = Browser(browser_type='chrome').get_driver(options=chrome_options)
    yield driver
    print('--------------TestCase end-----------------')
    driver.quit()